<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/base.jsp"%>
<% 
  //实例化AreaDao
  AreaDao areaDao=new AreaDao();
  int[]grades={1,2,3,4,5,6,7,8,9};
  List<Area> areaList=areaDao.findListByGrade(grades);
  ChronicdisDao chronicdisDao = new ChronicdisDao();
  List<Chronicdis> chronicdisList =chronicdisDao.findByKeyValue(null, null);
  
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">

<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>

<script src="third/layui/layui.all.js"></script>
<link rel="stylesheet" href="third/layui/css/layui.css">
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#add_btn").bind("click", function() {
			$('form').submit();
		});
	});
</script>
<%
	String userid = session.getAttribute("userid").toString();
%>
</head>

<body>

	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>增加家庭档案信息</strong>
		</div>
		<div class="body-content">
			<form id="form-add" method="post" class="form-x"
				action="<%=path%>/biz/Ill_cardServle?m=add">
				
				<div class="form-group">
					<div class="label">
						<label>姓名：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50"
						 	value="<%=request.getParameter("membername")==null?"":request.getParameter("membername")%>" name="membername"
							data-validate="required:请输入身份证号" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div> 
				
				 <div class="form-group">
					<div class="label">
						<label>身份证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=request.getParameter("IDcard")==null?"":request.getParameter("IDcard")%>" name="IDcard"
							data-validate="required:请输入身份证号" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div> 
				
				<div class="form-group">
					<div class="label">
						<label>参合证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" 
							value="<%=request.getParameter("join_nh_code")==null?"":request.getParameter("join_nh_code")%>" name="join_nh_code"
							data-validate="required:请输入参合证号" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div>

			<div class="form-group">
					<div class="label">
						<label>疾病名称：</label>
					</div>
					<div class="field">
					<input type="text" class="input w50" value="" name="ill_name" list="ill_list" id=""/>
						<datalist id="ill_list" class="selectDate" aria-invalid="false"> 
							<%
						  for(Chronicdis m:chronicdisList){ 
						
						  %>
							<option value="<%=m.getIllcode()%>"><%=m.getIllname()%></option>
							<%} %>

						</datalist >


						<div class="tips"></div>
					</div>

				 </div>

				 <div class="form-group">
					<div class="label">
						<label>起始时间：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="start_day" id="start_day" />
						<div class="tips"></div>
					</div>
				</div> 

				 <div class="form-group">
					<div class="label">
						<label>终止时间'：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="end_day" id="end_day" />
						<div class="tips"></div>
					</div>
				</div> 

				<div class="form-group">
					<div class="label">
						<label>登记员：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=userid %>" name="user_id"
							data-validate="required:请输入登记员" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o" type="button">提交</button>
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
<!-- 以下是时间控件 -->
<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;

  //执行一个laydate实例
  laydate.render({
    elem: '#start_day' //指定元素
    ,value: '${tbPoltVote.votestartTime}'
    ,type: 'datetime',
    isInitValue: true
  });
});
</script>
<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;
  
  //执行一个laydate实例
  laydate.render({
    elem: '#end_day' //指定元素
    ,value: '${tbPoltVote.voteendTime}'
    ,type: 'datetime'
    ,isInitValue: true
  });
});
</script>
</body>
</html>
